Dynomotion

Group: DynoMotion Message: 2311 From: bradodarb Date: 11/18/2011
Subject: Origin Offsets.... cripes
Hello Tom,



One thing I forgot about implementing was orgin offset definitions....


I do not see where you do that in KMCNC, but I did see it in an example gcode program.



Do you have a method for populating these offset structures from code?


Thank you,

Brad Murry
Group: DynoMotion Message: 2317 From: Tom Kerekes Date: 11/18/2011
Subject: Re: Origin Offsets.... cripes
Hi Brad,
 
No KMotionCNC only supports doing it with GCode.  But you should be able to just set the Interpreter's parameters directly see below:
 
pars = settings->parameters;
 
k = (5200 + (_setup.origin_index * 20));
SET_ORIGIN_OFFSETS((pars[k + 1] + pars[5211]),
(pars[k + 2] + pars[5212]), (pars[k + 3] + pars[5213]),
(pars[k + 4] + pars[5214]), (pars[k + 5] + pars[5215]),
(pars[k + 6] + pars[5216]));
 
 
TK

Group: DynoMotion Message: 2418 From: Brad Murry Date: 11/25/2011
Subject: Re: Origin Offsets.... cripes

Hello Tom,

 

I started implementing this last night and  I have it working, but I am unclear how your array indexing scheme relates to the addresses used by 54-59.x….

 

Is there a doc that describes this relationship?  Can you spell things out if not?

 

Sorry for the hassle.

 

-Brad Murry

 

From: DynoMotion@yahoogroups.com [mailto:DynoMotion@yahoogroups.com] On Behalf Of Tom Kerekes
Sent: Friday, November 18, 2011 7:08 PM
To: DynoMotion@yahoogroups.com
Subject: Re: [DynoMotion] Origin Offsets.... cripes

 

 

Hi Brad,

 

No KMotionCNC only supports doing it with GCode.  But you should be able to just set the Interpreter's parameters directly see below:

 

pars = settings->parameters;

 

k = (5200 + (_setup.origin_index * 20));

SET_ORIGIN_OFFSETS((pars[k + 1] + pars[5211]),

(pars[k + 2] + pars[5212]), (pars[k + 3] + pars[5213]),

(pars[k + 4] + pars[5214]), (pars[k + 5] + pars[5215]),

(pars[k + 6] + pars[5216]));

 

 

TK

 

From: bradodarb <bradodarb@...>
To: DynoMotion@yahoogroups.com
Sent: Friday, November 18, 2011 4:35 PM
Subject: [DynoMotion] Origin Offsets.... cripes

 

Hello Tom,

One thing I forgot about implementing was orgin offset definitions....

I do not see where you do that in KMCNC, but I did see it in an example gcode program.

Do you have a method for populating these offset structures from code?

Thank you,

Brad Murry

 

Group: DynoMotion Message: 2421 From: Tom Kerekes Date: 11/25/2011
Subject: Re: Origin Offsets.... cripes
Hi  Brad,
 
That isn't really "my" scheme but rather from the original EMC code and specification.  I'd have to research/reverse engineer it.
 
But it seems like the origin offsets are just indexed by 20 variables (even though only 6 are needed).  See the origin_index*20 below.
 
Google found this:
 
coordinate parameters emc.var
Parameter Number(s) 	Meaning
5061-5069 		Result of “G38.2” Probe
5161-5169 		“G28” Home
5181-5189 		“G30” Home
5211-5219 		“G92” offset
5220 			Coordinate System Number
5221-5229 		Coordinate System 1
5241-5249 		Coordinate System 2
5261-5269 		Coordinate System 3
5281-5289 		Coordinate System 4
5301-5309 		Coordinate System 5
5321-5329 		Coordinate System 6
5341-5349 		Coordinate System 7
5361-5369 		Coordinate System 8
5381-5389 		Coordinate System 9
5399 			Result of M66 - Check or wait for input
 
Regards
TK
 
 
 
Group: DynoMotion Message: 2424 From: Brad Murry Date: 11/25/2011
Subject: Re: Origin Offsets.... cripes

I could just shoe-horn this into the interop, but wondered if this might be useful to others.

 

Should I implement this in GCodeInterpreter first so it is available for KMotionCNC?

 

-Brad Murry

 

From: DynoMotion@yahoogroups.com [mailto:DynoMotion@yahoogroups.com] On Behalf Of Tom Kerekes
Sent: Friday, November 25, 2011 12:25 PM
To: DynoMotion@yahoogroups.com
Subject: Re: [DynoMotion] Origin Offsets.... cripes

 

 

Hi  Brad,

 

That isn't really "my" scheme but rather from the original EMC code and specification.  I'd have to research/reverse engineer it.

 

But it seems like the origin offsets are just indexed by 20 variables (even though only 6 are needed).  See the origin_index*20 below.

 

Google found this:

 

coordinate parameters emc.var

Parameter Number(s)    Meaning
5061-5069              Result of “G38.2” Probe
5161-5169              “G28” Home
5181-5189              “G30” Home
5211-5219              “G92” offset
5220                   Coordinate System Number
5221-5229              Coordinate System 1
5241-5249              Coordinate System 2
5261-5269              Coordinate System 3
5281-5289              Coordinate System 4
5301-5309              Coordinate System 5
5321-5329              Coordinate System 6
5341-5349              Coordinate System 7
5361-5369              Coordinate System 8
5381-5389              Coordinate System 9
5399                   Result of M66 - Check or wait for input

 

Regards

TK

 

 

 

From: Brad Murry <bradodarb@...>
To: DynoMotion@yahoogroups.com
Sent: Friday, November 25, 2011 10:09 AM
Subject: RE: [DynoMotion] Origin Offsets.... cripes

 

Hello Tom,

 

I started implementing this last night and  I have it working, but I am unclear how your array indexing scheme relates to the addresses used by 54-59.x….

 

Is there a doc that describes this relationship?  Can you spell things out if not?

 

Sorry for the hassle.

 

-Brad Murry

 

From: DynoMotion@yahoogroups.com [mailto:DynoMotion@yahoogroups.com] On Behalf Of Tom Kerekes
Sent: Friday, November 18, 2011 7:08 PM
To: DynoMotion@yahoogroups.com
Subject: Re: [DynoMotion] Origin Offsets.... cripes

 

 

Hi Brad,

 

No KMotionCNC only supports doing it with GCode.  But you should be able to just set the Interpreter's parameters directly see below:

 

pars = settings->parameters;

 

k = (5200 + (_setup.origin_index * 20));

SET_ORIGIN_OFFSETS((pars[k + 1] + pars[5211]),

(pars[k + 2] + pars[5212]), (pars[k + 3] + pars[5213]),

(pars[k + 4] + pars[5214]), (pars[k + 5] + pars[5215]),

(pars[k + 6] + pars[5216]));

 

 

TK

 

From: bradodarb <bradodarb@...>
To: DynoMotion@yahoogroups.com
Sent: Friday, November 18, 2011 4:35 PM
Subject: [DynoMotion] Origin Offsets.... cripes

 

Hello Tom,

One thing I forgot about implementing was orgin offset definitions....

I do not see where you do that in KMCNC, but I did see it in an example gcode program.

Do you have a method for populating these offset structures from code?

Thank you,

Brad Murry

 

 

Group: DynoMotion Message: 2425 From: Tom Kerekes Date: 11/25/2011
Subject: Re: Origin Offsets.... cripes
Hi Brad,
 
Not sure what you mean.  Like add special functions to avoid the magic numbers?
 
TK

Group: DynoMotion Message: 2426 From: brad murry Date: 11/25/2011
Subject: Re: Origin Offsets.... cripes
Exactly... Magic bad much

-Brad Murry

From: Tom Kerekes
Sent: 11/25/2011 1:11 PM
To: DynoMotion@yahoogroups.com
Subject: Re: [DynoMotion] Origin Offsets.... cripes

 

Hi Brad,
 
Not sure what you mean.  Like add special functions to avoid the magic numbers?
 
TK

From: Brad Murry <bradodarb@...>
To: DynoMotion@yahoogroups.com
Sent: Friday, November 25, 2011 11:52 AM
Subject: RE: [DynoMotion] Origin Offsets.... cripes

 
I could just shoe-horn this into the interop, but wondered if this might be useful to others.
 
Should I implement this in GCodeInterpreter first so it is available for KMotionCNC?
 
-Brad Murry
 
From: DynoMotion@yahoogroups.com [mailto:DynoMotion@yahoogroups.com] On Behalf Of Tom Kerekes
Sent: Friday, November 25, 2011 12:25 PM
To: DynoMotion@yahoogroups.com
Subject: Re: [DynoMotion] Origin Offsets.... cripes
 
 
Hi  Brad,
 
That isn't really "my" scheme but rather from the original EMC code and specification.  I'd have to research/reverse engineer it.
 
But it seems like the origin offsets are just indexed by 20 variables (even though only 6 are needed).  See the origin_index*20 below.
 
Google found this:
 
coordinate parameters emc.var
Parameter Number(s)    Meaning
5061-5069              Result of “G38.2” Probe
5161-5169              “G28” Home
5181-5189              “G30” Home
5211-5219              “G92” offset
5220                   Coordinate System Number
5221-5229              Coordinate System 1
5241-5249              Coordinate System 2
5261-5269              Coordinate System 3
5281-5289              Coordinate System 4
5301-5309
              Coordinate System 5
5321-5329              Coordinate System 6
5341-5349              Coordinate System 7
5361-5369              Coordinate System 8
5381-5389              Coordinate System 9
5399                  
 Result of M66 - Check or wait for input
 
Regards
TK
 
 
 
From: Brad Murry <bradodarb@...>
To: DynoMotion@yahoogroups.com
Sent: Friday, November 25, 2011 10:09 AM
Subject: RE: [DynoMotion] Origin Offsets.... cripes
 
Hello Tom,
 
I started implementing this last night and  I have it working, but I am unclear how your array indexing scheme relates to the addresses used by 54-59.x….
 
Is there a doc that describes this relationship?  Can you spell things out if not?
 
Sorry for the hassle.
 
-Brad Murry
 
From: DynoMotion@yahoogroups.com [mailto:DynoMotion@yahoogroups.com] On Behalf Of Tom Kerekes
Sent: Friday, November 18, 2011 7:08 PM
To: DynoMotion@yahoogroups.com
Subject: Re: [DynoMotion] Origin Offsets.... cripes
 
 
Hi Brad,
 
No KMotionCNC only supports doing it with GCode.  But you should be able to just set the Interpreter's parameters directly see below:
 
pars = settings->parameters;
 
k = (5200 + (_setup.origin_index * 20));
SET_ORIGIN_OFFSETS((pars[k + 1] + pars[5211]),
(pars[k + 2] + pars[5212]), (pars[k + 3] + pars[5213]),
(pars[k + 4] + pars[5214]), (pars[k + 5] + pars[5215]),
(pars[k + 6] + pars[5216]));
 
 
TK
 
From: bradodarb <bradodarb@...>
To: DynoMotion@yahoogroups.com
Sent: Friday, November 18, 2011 4:35 PM
Subject: [DynoMotion] Origin Offsets.... cripes
 
Hello Tom,

One thing I forgot about implementing was orgin offset definitions....

I do not see where you do that in KMCNC, but I did see it in an example gcode program.

Do you have a method for populating these offset structures from code?

Thank you,

Brad Murry
 
 


Group: DynoMotion Message: 2428 From: Tom Kerekes Date: 11/25/2011
Subject: Re: Origin Offsets.... cripes
Ok sure.  Make changes relative to the V4.28x version and we will merge them in.
 
TK